#!/bin/bash

# Тест работы интерпретатора SBL (простые алгоритмы и проверки)

echo "Тест работы интерпретатора SBL ====================================" > test/tmp/test-interpret-simodo-script-probe.out

for file in test/source/simodo-script/probe/*.simodo-script
do
    echo "--- ${file} :" >> test/tmp/test-interpret-simodo-script-probe.out
    cat ${file} >> test/tmp/test-interpret-simodo-script-probe.out
    echo "--- interpret :" >> test/tmp/test-interpret-simodo-script-probe.out
    bin/simodo-interpret -m math ${file} >> test/tmp/test-interpret-simodo-script-probe.out
done

echo "Тест работы анализатора SBL ====================================" >> test/tmp/test-interpret-simodo-script-probe.out

for file in test/source/simodo-script/probe/*.simodo-script
do
    echo "--- ${file} :" >> test/tmp/test-interpret-simodo-script-probe.out
    cat ${file} >> test/tmp/test-interpret-simodo-script-probe.out
    echo "--- interpret :" >> test/tmp/test-interpret-simodo-script-probe.out
    bin/simodo-interpret -m math ${file} -p a >> test/tmp/test-interpret-simodo-script-probe.out
done

exit 0
